Skip to content

fix(extensions): restore UI extension targets on add + deploy (DEVX-541)#107

Open
smukherjee-godaddy wants to merge 3 commits into
godaddy:rust-portfrom
smukherjee-godaddy:DEVX-541-extension-targets
Open

fix(extensions): restore UI extension targets on add + deploy (DEVX-541)#107
smukherjee-godaddy wants to merge 3 commits into
godaddy:rust-portfrom
smukherjee-godaddy:DEVX-541-extension-targets

Conversation

@smukherjee-godaddy

Copy link
Copy Markdown
Contributor

Problem

UI extension targets were lost end to end:

  • application add extension embed/checkout had no --target flag and wrote targets: [] to godaddy.toml.
  • collect_extensions() dropped targets entirely.
  • deploy_extension() uploaded every extension with target = <extension name> instead of the configured target surface.

So embed/checkout artifacts were uploaded to the wrong target locations, and there was no way to specify where an extension should render.

Fix

Ports the TS target handling:

  • add extension embed / checkout — add a required --target (comma-separated, at least one). parse_targets() trims, splits, and drops empty entries; the parsed targets are written to godaddy.toml (previously hard-coded empty). blocks is unchanged (it takes no target).

  • collect_extensions() — carry each extension's targets via a small ExtensionDeploy struct instead of discarding them.

  • deploy_extension() — bundle once, then upload once per resolved target. resolve_upload_targets() maps:

    • blocks → the fixed "blocks" target,
    • embed/checkout → each configured target, or a single untargeted upload (None) when none are configured.

    The upload's target is now the configured value, not the extension name.

Impact

  • Extensions upload to their configured target surfaces.
  • Multi-target extensions upload once per target.
  • Closes the extension chain: add (--target)release maps targets (DEVX-540)deploy uploads per target.

Testing

  • Unit tests: parse_targets (trim/split/drop-empty) and resolve_upload_targets (blocks / no-target / multi-target).
  • cargo test / cargo clippy --all-targets -- -D warnings / cargo fmt --check — all clean.

Context

Track A ("ship an app"). Pairs with DEVX-540 (release input maps these targets) and DEVX-539 (deploy activation).

smukherjee-godaddy and others added 2 commits July 15, 2026 10:54
`application add extension embed/checkout` had no --target flag and wrote
targets: [], and deploy uploaded every extension to a target equal to the
extension *name* — so configured target surfaces were lost and artifacts landed
in the wrong place. Ports the TS target handling.

- add extension embed/checkout: add required --target (comma-separated, >=1);
  parse_targets() trims/splits/drops empties; write the parsed targets to
  godaddy.toml (was hard-coded empty).
- collect_extensions: carry each extension's targets (ExtensionDeploy struct)
  instead of dropping them.
- deploy_extension: bundle once, then upload once per resolved target —
  resolve_upload_targets() maps blocks -> "blocks", embed/checkout -> each
  configured target (or a single untargeted upload when none). The upload target
  is the configured value, not the extension name.
- tests: parse_targets + resolve_upload_targets.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…on-targets

# Conflicts:
#	rust/src/application/commands/mod.rs

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Restores end-to-end handling of UI extension “targets” so that extension configuration (godaddy.toml) is preserved through collection and used correctly during deploy uploads, preventing artifacts from being uploaded to incorrect target surfaces.

Changes:

  • Adds a required --target flag for application add extension embed|checkout and persists parsed targets into godaddy.toml.
  • Updates extension collection to retain targets via a new ExtensionDeploy struct.
  • Updates deploy logic to upload once per resolved target (including a fixed blocks target and an untargeted upload when no targets exist) and adds unit tests for target parsing/resolution.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread rust/src/application/commands/mod.rs Outdated
Comment thread rust/src/application/commands/mod.rs
Preserve stable upload completion events and reuse shared bundle bytes across multi-target uploads.
@jpage-godaddy

jpage-godaddy commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator

Looks like there are some merge conflicts; can you resolve, and then we should be able to merge. I'll also request another round of Copilot reviews.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 4 changed files in this pull request and generated no new comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants